{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "import lightgbm as lgbm\n",
    "from lightgbm.sklearn import LGBMClassifier\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>feat_1_tfidf</th>\n",
       "      <th>feat_2_tfidf</th>\n",
       "      <th>feat_3_tfidf</th>\n",
       "      <th>feat_4_tfidf</th>\n",
       "      <th>feat_5_tfidf</th>\n",
       "      <th>feat_6_tfidf</th>\n",
       "      <th>feat_7_tfidf</th>\n",
       "      <th>feat_8_tfidf</th>\n",
       "      <th>feat_9_tfidf</th>\n",
       "      <th>...</th>\n",
       "      <th>feat_85_tfidf</th>\n",
       "      <th>feat_86_tfidf</th>\n",
       "      <th>feat_87_tfidf</th>\n",
       "      <th>feat_88_tfidf</th>\n",
       "      <th>feat_89_tfidf</th>\n",
       "      <th>feat_90_tfidf</th>\n",
       "      <th>feat_91_tfidf</th>\n",
       "      <th>feat_92_tfidf</th>\n",
       "      <th>feat_93_tfidf</th>\n",
       "      <th>target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.081393</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.075886</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.231403</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.199730</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>0.011987</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.011668</td>\n",
       "      <td>0.105971</td>\n",
       "      <td>0.021681</td>\n",
       "      <td>0.080435</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.008244</td>\n",
       "      <td>0.022456</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.124622</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.145988</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>Class_1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 95 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  feat_1_tfidf  feat_2_tfidf  feat_3_tfidf  feat_4_tfidf  feat_5_tfidf  \\\n",
       "0   1      0.081393           0.0           0.0      0.000000      0.000000   \n",
       "1   2      0.000000           0.0           0.0      0.000000      0.000000   \n",
       "2   3      0.000000           0.0           0.0      0.000000      0.000000   \n",
       "3   4      0.011987           0.0           0.0      0.011668      0.105971   \n",
       "4   5      0.000000           0.0           0.0      0.000000      0.000000   \n",
       "\n",
       "   feat_6_tfidf  feat_7_tfidf  feat_8_tfidf  feat_9_tfidf   ...     \\\n",
       "0      0.000000      0.000000      0.000000           0.0   ...      \n",
       "1      0.000000      0.000000      0.231403           0.0   ...      \n",
       "2      0.000000      0.000000      0.199730           0.0   ...      \n",
       "3      0.021681      0.080435      0.000000           0.0   ...      \n",
       "4      0.000000      0.000000      0.000000           0.0   ...      \n",
       "\n",
       "   feat_85_tfidf  feat_86_tfidf  feat_87_tfidf  feat_88_tfidf  feat_89_tfidf  \\\n",
       "0       0.075886       0.000000       0.000000            0.0            0.0   \n",
       "1       0.000000       0.000000       0.000000            0.0            0.0   \n",
       "2       0.000000       0.000000       0.000000            0.0            0.0   \n",
       "3       0.000000       0.008244       0.022456            0.0            0.0   \n",
       "4       0.124622       0.000000       0.000000            0.0            0.0   \n",
       "\n",
       "   feat_90_tfidf  feat_91_tfidf  feat_92_tfidf  feat_93_tfidf   target  \n",
       "0       0.000000            0.0            0.0            0.0  Class_1  \n",
       "1       0.000000            0.0            0.0            0.0  Class_1  \n",
       "2       0.000000            0.0            0.0            0.0  Class_1  \n",
       "3       0.000000            0.0            0.0            0.0  Class_1  \n",
       "4       0.145988            0.0            0.0            0.0  Class_1  \n",
       "\n",
       "[5 rows x 95 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#读取数据\n",
    "train=pd.read_csv(\"Otto_FE_train_tfidf.csv\")\n",
    "train.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train=train['target']\n",
    "#只接受数字标签\n",
    "y_train=y_train.map(lambda s :s[6:])\n",
    "y_train=y_train.map(lambda s :int(s)-1)\n",
    "\n",
    "X_train=train.drop([\"id\",\"target\"],axis=1)\n",
    "#特征名字\n",
    "feat_names=X_train.columns\n",
    "#稀疏矩阵\n",
    "from scipy.sparse import csr_matrix\n",
    "X_train=csr_matrix(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "MAX_ROUNDS=10000\n",
    "from sklearn.model_selection import  StratifiedKFold#交叉验证\n",
    "\n",
    "kfold=StratifiedKFold(n_splits=3,shuffle=True,random_state=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "#内嵌的交叉验证\n",
    "def get_n_estimators(params,X_train,y_train,early_stopping_rounds=10):\n",
    "    lgbm_params=params.copy()\n",
    "    lgbm_params['num_class']=9\n",
    "    lgbmtrain=lgbm.Dataset(X_train,y_train)\n",
    "    \n",
    "    cv_result=lgbm.cv(lgbm_params,lgbmtrain,num_boost_round=MAX_ROUNDS,nfold=3,metrics='multi_logloss',early_stopping_rounds=early_stopping_rounds,seed=3)\n",
    "    \n",
    "    print('best n_estimators:',len(cv_result['multi_logloss-mean']))\n",
    "    print('best cv score:',cv_result['multi_logloss-mean'][-1])\n",
    "    \n",
    "    return len(cv_result['multi_logloss-mean'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best n_estimators: 150\n",
      "best cv score: 0.5009660625550614\n"
     ]
    }
   ],
   "source": [
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.1,\n",
    "       'num_leaves':60,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.7,\n",
    "\n",
    "       'colsample_bytree':0.7\n",
    "       }\n",
    "n_estimators_1=get_n_estimators(params,X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 4 candidates, totalling 12 fits\n",
      "[CV] num_leaves=40 ...................................................\n",
      "[CV] num_leaves=40 ...................................................\n",
      "[CV] num_leaves=40 ...................................................\n",
      "[CV] num_leaves=50 ...................................................\n",
      "[CV] ......... num_leaves=40, score=-0.5011932496554806, total= 1.1min\n",
      "[CV] ........ num_leaves=40, score=-0.49432603438720296, total= 1.1min\n",
      "[CV] num_leaves=50 ...................................................\n",
      "[CV] num_leaves=50 ...................................................\n",
      "[CV] ........ num_leaves=50, score=-0.48928444227989054, total= 1.3min\n",
      "[CV] num_leaves=60 ...................................................\n",
      "[CV] ......... num_leaves=40, score=-0.5092159023717556, total= 1.5min\n",
      "[CV] num_leaves=60 ...................................................\n",
      "[CV] ......... num_leaves=50, score=-0.5059843939189307, total= 1.5min\n",
      "[CV] num_leaves=60 ...................................................\n",
      "[CV] ......... num_leaves=50, score=-0.5015326360633676, total= 1.6min\n",
      "[CV] num_leaves=70 ...................................................\n",
      "[CV] ........ num_leaves=60, score=-0.49924664572957184, total= 1.4min\n",
      "[CV] num_leaves=70 ...................................................\n",
      "[CV] ........ num_leaves=60, score=-0.49131320338950185, total= 1.9min\n",
      "[CV] num_leaves=70 ...................................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done   8 out of  12 | elapsed:  3.3min remaining:  1.6min\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] ........ num_leaves=70, score=-0.48972139221521654, total= 1.6min\n",
      "[CV] ........... num_leaves=60, score=-0.50366836485578, total= 1.9min\n",
      "[CV] ......... num_leaves=70, score=-0.4984745073455144, total= 1.6min\n",
      "[CV] ......... num_leaves=70, score=-0.5089772129521941, total= 1.6min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  12 out of  12 | elapsed:  4.9min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, maxdepth=7, min_child_samples=20,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=150,\n",
       "        n_jobs=-1, num_leaves=60, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=True,\n",
       "        solent=False, subsample=0.7, subsample_for_bin=200000,\n",
       "        subsample_freq=0),\n",
       "       fit_params=None, iid=True, n_jobs=-1,\n",
       "       param_grid={'num_leaves': range(40, 80, 10)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#num_leaves\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.1,\n",
    "       'n_estimators':n_estimators_1,\n",
    "       'num_leaves':60,\n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.7,\n",
    "\n",
    "       'colsample_bytree':0.7\n",
    "       }\n",
    "lg=LGBMClassifier(solent=False,**params)\n",
    "num_leaves_s=range(40,80,10)\n",
    "tuned_parameters=dict(num_leaves=num_leaves_s)\n",
    "\n",
    "grid_search=GridSearchCV(lg,n_jobs=-1,param_grid=tuned_parameters,cv=kfold,scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.49807567198555874\n",
      "{'num_leaves': 60}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAELCAYAAADkyZC4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd8VuX9//HXOwlhb8IOhI2AgBLBiVBE0FZw4KDailWxjtqf4sAOtVir4m5L/Trq6FREreCAooJYcRCUsEcIK7LC3oQkn98f90EjBnKDuXNyJ5/n43E/cp9zX+fcn8MdeHOu+zrnkpnhnHPOlbaEsAtwzjlXMXnAOOeciwkPGOecczHhAeOccy4mPGCcc87FhAeMc865mPCAcc45FxMeMM4552LCA8Y551xMJIVdQJgaNWpkaWlpYZfhnHNxZfbs2ZvMLKWkdpU6YNLS0sjIyAi7DOeciyuSVkXTzrvInHPOxYQHjHPOuZjwgHHOORcTHjDOOediwgPGOedcTHjAOOeciwkPGOecczHhAXMMNuzYx/P/WxF2Gc45V655wByDV2atYcxbC5myYH3YpTjnXLkV04CRNFjSEklZkkYX8/oISbmS5gSPa4q8dqWkZcHjyiLr75e0RtKuaPdV2n5+Zju6NKvDr9+Yx+Zd+2P1Ns45F9diFjCSEoFxwDlAF2C4pC7FNH3FzHoGj+eCbRsA9wB9gN7APZLqB+0nBeuK8519xUJyUgKPXdqD7XsP8Jv/zMfMYvVWz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lxK5EetlwF8k1QJOBV4N9gNwcL6fj4EXJY0HXo+iJueOigeMc9HZX+R5AVAdyOebXoBqR2hfWGS5kOj+3glYYGanFPPai8D5ZpYpaQTQL1g/EXgg6ILrBXwA1CQyOV7PQ3diZj+X1IfIDKdzJPU0s81R1OZcVLyLzLljt5LIP+TwzdQNpWUJkCLpFIh0mUnqGrxWG1gXdKNdfnADM9sFfE5kLvm3gnlLdgArJF0c7EeSegTP25nZZ2Z2N7AJSC3lY3CVnAeMc8fuEeB6STOBRqW5YzPLIxJaD0nKJDKNwqnBy78FPgOmAosP2fQV4Irg50GXA1cH+1lAZC52gIclzZM0H5hB5Dsc50qN367fOedcTPgZjHPOuZjwL/mdC4GkccBph6x+0sxeCKMe52LBu8icc87FhHeROeeciwkPGOecczHhAeOccy4mPGCcc87FhAeMc865mPj/UFhsR1lyKYUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([-0.50157791, -0.49893328, -0.49807567, -0.49905708])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# examine the best model\n",
    "print(-grid_search.best_score_)\n",
    "print(grid_search.best_params_)\n",
    "\n",
    "# plot CV误差曲线\n",
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid_search.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid_search.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid_search.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "n_leafs = len(num_leaves_s)\n",
    "\n",
    "x_axis = num_leaves_s\n",
    "plt.plot(x_axis, -test_means)\n",
    "#plt.errorbar(x_axis, -test_means, yerr=test_stds,label = ' Test')\n",
    "#plt.errorbar(x_axis, -train_means, yerr=train_stds,label = ' Train')\n",
    "plt.xlabel( 'num_leaves' )\n",
    "plt.ylabel( 'Log Loss' )\n",
    "plt.show()\n",
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "### 'num_leaves': 60"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 4 candidates, totalling 12 fits\n",
      "[CV] min_child_samples=50 ............................................\n",
      "[CV] min_child_samples=50 ............................................\n",
      "[CV] min_child_samples=50 ............................................\n",
      "[CV] min_child_samples=60 ............................................\n",
      "[CV] . min_child_samples=50, score=-0.49257907554848646, total= 1.5min\n",
      "[CV] min_child_samples=60 ............................................\n",
      "[CV] .. min_child_samples=50, score=-0.5055551880935468, total= 1.7min\n",
      "[CV] min_child_samples=60 ............................................\n",
      "[CV] .. min_child_samples=50, score=-0.5008034239284945, total= 1.7min\n",
      "[CV] min_child_samples=70 ............................................\n",
      "[CV] .. min_child_samples=60, score=-0.4897112057291389, total= 1.7min\n",
      "[CV] min_child_samples=70 ............................................\n",
      "[CV] .... min_child_samples=70, score=-0.50364932174275, total= 1.3min\n",
      "[CV] min_child_samples=70 ............................................\n",
      "[CV] .. min_child_samples=60, score=-0.4990485455673563, total= 1.6min\n",
      "[CV] min_child_samples=80 ............................................\n",
      "[CV] ... min_child_samples=60, score=-0.507330674895599, total= 1.6min\n",
      "[CV] min_child_samples=80 ............................................\n",
      "[CV] . min_child_samples=70, score=-0.49190900537876087, total= 1.7min\n",
      "[CV] min_child_samples=80 ............................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done   8 out of  12 | elapsed:  3.7min remaining:  1.8min\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .. min_child_samples=70, score=-0.5057868327470503, total= 1.5min\n",
      "[CV] .. min_child_samples=80, score=-0.4916669285576613, total= 1.6min\n",
      "[CV] .. min_child_samples=80, score=-0.5017529396370609, total= 1.5min\n",
      "[CV] .. min_child_samples=80, score=-0.5068394929076214, total= 1.5min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  12 out of  12 | elapsed:  5.2min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, maxdepth=7, min_child_samples=20,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=150,\n",
       "        n_jobs=-1, num_leaves=60, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid=True, n_jobs=-1,\n",
       "       param_grid={'min_child_samples': range(50, 90, 10)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#min_child_samples\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.1,\n",
    "       'n_estimators':n_estimators_1,\n",
    "       'num_leaves':60,\n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.7,\n",
    " \n",
    "       'colsample_bytree':0.7\n",
    "       }\n",
    "lg=LGBMClassifier(silent=False,**params)\n",
    "min_child_samples_s=range(50,90,10)\n",
    "tuned_parameters=dict(min_child_samples = min_child_samples_s)\n",
    "\n",
    "grid_search=GridSearchCV(lg,n_jobs=-1,param_grid=tuned_parameters,cv=kfold,scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.49869623924011447\n",
      "{'min_child_samples': 60}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAD8CAYAAABZ/vJZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xl8FfXV+PHPyU5CCFvCkhASVkVWuSa4gCiC2PoA7oAKqIjaoi36e1rbp8vzaGutrWu1bgjiAkhtq2i1ioi4khBkky0JEEIASSDskIQk5/fHndBrDOQSkkzuzXm/XveVme/9ztzzdUwOZ2bufEVVMcYYY05XiNsBGGOMCUyWQIwxxtSJJRBjjDF1YgnEGGNMnVgCMcYYUyeWQIwxxtSJJRBjjDF1YgnEGGNMnVgCMcYYUydhbgfQkNq3b68pKSluh2GMMQFlxYoVe1Q1vrZ+fiUQERkNPAmEAjNV9eFq708B/gTscJqeVtWZznuTgV857b9T1TlO+2DgZaAF8B7wE1VVEflf4HagyNnml6r6nrPNL4DbgArgHlX94FRxp6SkkJWV5c8QjTHGOERk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AzF4f/erq/frFZZAHKq60/lZCPwTSAN2i0gnAOdnoXsR+q+msajqblWtUNVK4EW842vqCoACVc1w1t/E+4c40I5LjeMI0GNS5Qrga1Xd7awH2jHx9Z2xBOBxuQzYqqpFqnoc+AdwAdDaOaUFkATsrO8PtgQCiEiMiMRWLQOjgG+AhcBkp9tk4G13IvTfycZS9cvtuArv+Jo0Vf0W2C4ivZ2mEcB6Auy4nGwcgXhMfEzgu6d8AuqYVPOdsQTgcckHhohItIgI//k9WQJc6/RpkGNid2EBItIN77/UwXu6Ya6q/l5E2gELgGS8B+k6VS12KUy/nGIsr+ItyRXIA+6oOmfdlInIQGAmEAFswXuHTAiBd1xqGsdTBOYxiQa2A91U9YDTFnC/K3DSsQTc74qI/B9wA1AOrASm4r3mMR9o67TdpKql9fq5lkCMMcbUhZ3CMsYYUyeWQIwxxtSJJRBjjDF1YgnEGGNMnVgCMcYYUyeWQIwxxtSJJRBjjDF1YgnEGGNMnfx/NfZbPVyrDLQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([-0.49964548, -0.49869624, -0.50044794, -0.50008596])"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# examine the best model\n",
    "print(-grid_search.best_score_)\n",
    "print(grid_search.best_params_)\n",
    "# plot CV误差曲线\n",
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid_search.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid_search.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid_search.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "x_axis = min_child_samples_s\n",
    "\n",
    "plt.plot(x_axis, -test_means)\n",
    "#plt.errorbar(x_axis, -test_scores, yerr=test_stds ,label = ' Test')\n",
    "#plt.errorbar(x_axis, -train_scores, yerr=train_stds,label =  +' Train')\n",
    "\n",
    "plt.show()\n",
    "\n",
    "\n",
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 'min_child_samples': 60"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n",
      "[CV] sub_samples=0.5 .................................................\n",
      "[CV] sub_samples=0.5 .................................................\n",
      "[CV] sub_samples=0.6 .................................................\n",
      "[CV] sub_samples=0.5 .................................................\n",
      "[CV] ....... sub_samples=0.6, score=-0.4897112057291389, total= 1.2min\n",
      "[CV] sub_samples=0.6 .................................................\n",
      "[CV] ........ sub_samples=0.5, score=-0.507330674895599, total= 1.2min\n",
      "[CV] sub_samples=0.6 .................................................\n",
      "[CV] ....... sub_samples=0.5, score=-0.4990485455673563, total= 1.2min\n",
      "[CV] sub_samples=0.7 .................................................\n",
      "[CV] ....... sub_samples=0.5, score=-0.4897112057291389, total= 1.3min\n",
      "[CV] sub_samples=0.7 .................................................\n",
      "[CV] ....... sub_samples=0.7, score=-0.4897112057291389, total= 1.4min\n",
      "[CV] sub_samples=0.7 .................................................\n",
      "[CV] ........ sub_samples=0.6, score=-0.507330674895599, total= 1.4min\n",
      "[CV] sub_samples=0.8 .................................................\n",
      "[CV] ....... sub_samples=0.7, score=-0.4990485455673563, total= 1.5min\n",
      "[CV] sub_samples=0.8 .................................................\n",
      "[CV] ....... sub_samples=0.6, score=-0.4990485455673563, total= 1.9min\n",
      "[CV] sub_samples=0.8 .................................................\n",
      "[CV] ....... sub_samples=0.8, score=-0.4897112057291389, total= 1.5min\n",
      "[CV] sub_samples=0.9 .................................................\n",
      "[CV] ....... sub_samples=0.8, score=-0.4990485455673563, total= 1.5min\n",
      "[CV] sub_samples=0.9 .................................................\n",
      "[CV] ........ sub_samples=0.7, score=-0.507330674895599, total= 1.7min\n",
      "[CV] sub_samples=0.9 .................................................\n",
      "[CV] ........ sub_samples=0.8, score=-0.507330674895599, total= 1.8min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  12 out of  15 | elapsed:  5.3min remaining:  1.3min\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] ....... sub_samples=0.9, score=-0.4897112057291389, total= 1.4min\n",
      "[CV] ....... sub_samples=0.9, score=-0.4990485455673563, total= 1.4min\n",
      "[CV] ........ sub_samples=0.9, score=-0.507330674895599, total= 1.3min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  15 out of  15 | elapsed:  6.1min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, maxdepth=7, min_child_samples=60,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=150,\n",
       "        n_jobs=-1, num_leaves=60, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.7, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid=True, n_jobs=-1,\n",
       "       param_grid={'sub_samples': [0.5, 0.6, 0.7, 0.8, 0.9]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#行采样参数\n",
    "#sub_samples\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.1,\n",
    "       'n_estimators':n_estimators_1,\n",
    "        'min_child_samples': 60,\n",
    "       'num_leaves':60,\n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.7,\n",
    "      \n",
    "       'colsample_bytree':0.7\n",
    "       }\n",
    "lg=LGBMClassifier(silent=False,**params)\n",
    "sub_samples=[i/10.0 for i in range(5,10)]\n",
    "tuned_parameters=dict(sub_samples =sub_samples)\n",
    "\n",
    "grid_search=GridSearchCV(lg,n_jobs=-1,param_grid=tuned_parameters,cv=kfold,scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.49869623924011447\n",
      "{'sub_samples': 0.5}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAD9dJREFUeJzt3X1snWd9xvHv1WSBAWUUYrTSpjhM5SVARdWzCE3aQEiFgEQyVsYC2tYwStGkrNLG/ihiGixo2sSmsT9WaWpRWYfE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CC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([-0.49869624, -0.49869624, -0.49869624, -0.49869624, -0.49869624])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# examine the best model\n",
    "print(-grid_search.best_score_)\n",
    "print(grid_search.best_params_)\n",
    "\n",
    "# plot CV误差曲线\n",
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid_search.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid_search.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid_search.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "x_axis = sub_samples\n",
    "\n",
    "plt.plot(x_axis, -test_means)\n",
    "#plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i] ,label = str(max_depths[i]) +' Test')\n",
    "#plt.errorbar(x_axis, -train_scores[:,i], yerr=train_stds[:,i] ,label = str(max_depths[i]) +' Train')\n",
    "\n",
    "plt.show()\n",
    "\n",
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 'sub_samples': 0.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n",
      "[CV] colsample_bytree=0.5 ............................................\n",
      "[CV] colsample_bytree=0.5 ............................................\n",
      "[CV] colsample_bytree=0.5 ............................................\n",
      "[CV] colsample_bytree=0.6 ............................................\n",
      "[CV] .. colsample_bytree=0.5, score=-0.5018804080442654, total= 1.5min\n",
      "[CV] colsample_bytree=0.6 ............................................\n",
      "[CV] .. colsample_bytree=0.5, score=-0.4932510431126546, total= 1.5min\n",
      "[CV] colsample_bytree=0.6 ............................................\n",
      "[CV] ... colsample_bytree=0.5, score=-0.508264238126811, total= 1.6min\n",
      "[CV] colsample_bytree=0.7 ............................................\n",
      "[CV] . colsample_bytree=0.6, score=-0.49256657064491116, total= 1.8min\n",
      "[CV] colsample_bytree=0.7 ............................................\n",
      "[CV] .. colsample_bytree=0.7, score=-0.4897112057291389, total= 1.4min\n",
      "[CV] colsample_bytree=0.7 ............................................\n",
      "[CV] .. colsample_bytree=0.6, score=-0.5007540460973979, total= 1.5min\n",
      "[CV] colsample_bytree=0.8 ............................................\n",
      "[CV] .. colsample_bytree=0.6, score=-0.5043711273096106, total= 1.7min\n",
      "[CV] colsample_bytree=0.8 ............................................\n",
      "[CV] .. colsample_bytree=0.7, score=-0.4990485455673563, total= 1.7min\n",
      "[CV] colsample_bytree=0.8 ............................................\n",
      "[CV] ... colsample_bytree=0.7, score=-0.507330674895599, total= 1.5min\n",
      "[CV] colsample_bytree=0.9 ............................................\n",
      "[CV] . colsample_bytree=0.8, score=-0.49075721119647575, total= 1.7min\n",
      "[CV] colsample_bytree=0.9 ............................................\n",
      "[CV] .. colsample_bytree=0.8, score=-0.5002702933560805, total= 1.9min\n",
      "[CV] colsample_bytree=0.9 ............................................\n",
      "[CV] .. colsample_bytree=0.8, score=-0.5045037701074819, total= 1.8min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  12 out of  15 | elapsed:  5.6min remaining:  1.4min\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .. colsample_bytree=0.9, score=-0.4927286576951485, total= 1.4min\n",
      "[CV] .. colsample_bytree=0.9, score=-0.5008444450392513, total= 1.3min\n",
      "[CV] .. colsample_bytree=0.9, score=-0.5040086170629748, total= 1.1min\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Done  15 out of  15 | elapsed:  6.5min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=1.0,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, maxdepth=7, min_child_samples=60,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=150,\n",
       "        n_jobs=-1, num_leaves=60, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        subsample=0.5, subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid=True, n_jobs=-1,\n",
       "       param_grid={'colsample_bytree': [0.5, 0.6, 0.7, 0.8, 0.9]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#列采样参数\n",
    "#sub_feature\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.1,\n",
    "       'n_estimators':n_estimators_1,\n",
    "        'min_child_samples': 60,\n",
    "       'num_leaves':60,\n",
    "        \n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.5,\n",
    "\n",
    "      # 'colsample_bytree':0.7\n",
    "       }\n",
    "lg=LGBMClassifier(silent=False,**params)\n",
    "colsample_bytree=[i/10.0 for i in range(5,10)]\n",
    "tuned_parameters=dict(colsample_bytree = colsample_bytree)\n",
    "\n",
    "grid_search=GridSearchCV(lg,n_jobs=-1,param_grid=tuned_parameters,cv=kfold,scoring=\"neg_log_loss\",verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.4985099805750045\n",
      "{'colsample_bytree': 0.8}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "/home/liu/anaconda3/lib/python3.7/site-packages/sklearn/utils/deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD8CAYAAABpcuN4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xl8FfW9//HXJxtrAoEkECAQICEQFLBEcN+QRdsLWle6CHVrtS5VXHq9t7+qvT6uolRtpfYq1au2dbdXqBUEBEEFJSBbhJCwhzVsYc/6/f1xJnjEkJxAkjlJ3s/H4zycM+c7M58Zw3mfWb/mnENEROREIvwuQEREwpuCQkREqqWgEBGRaikoRESkWgoKERGploJCRESqpaAQEZFqKShERKRaCgoREalWlN8F1IWEhASXmprqdxkiIo3K4sWLdznnEmtq1ySCIjU1lezsbL/LEBFpVMxsYyjtdOhJRESqpaAQEZFqKShERKRaCgoREamWgkJERKqloBARkWopKEREpFrNOihythbxxPTVqDtYEZETa9ZBsWj9Hp6fu5Z5ebv8LkVEJGw166AYO7Q73eJbMXH6aioqtFchIlKVZh0ULaIiuXd4H3K27ueDFdv8LkdEJCw166AAGDOoKxmdYpn0US6l5RV+lyMiEnaafVBERhj3j8xgw+7DvJW92e9yRETCTrMPCoBh/ZIY3COeP8zO40hJud/liIiElZCCws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KBDswauqz6FUlcmMNsbnhP0eZ3/fTXloKiqr++uVbS7ytt1e8fMKnvyC3Xahq4LoKWZZZvZQjO7oo5qCrWuPkAfM/vMW/6oWkzrR13g7/YCAocICPwS/ri20zZwXeDv9noY+ImZFQD/IrC3E+q0ftQF0NM7JPWJmZ1fRzWFWtcy4Cpv+Eog1sw6hjhtrTTloKi2r2/PNCDVOTcAmAW8Uotp/agLoLsL3IX5I+AZM+vdgHVFETjMcxGBX6JTzKx9iNP6URf4u70qXQ+845wrP4lpa+tU6gJ/t9dY4H+dc92Ay4HXzCwixGn9qGsbge11BnAv8Hczi6NuhFLXfcCFZvYVcCGBzuHKQpy2VppyUNTU1zfOud3OuWLv7YvA4FCn9akunHNbvf+uA+YCZzRUXV6b951zpd4hgFwCX9C+bq9q6vJ7e1W6nm8f3vF7e52oLr+3103AW97yFwAtCTzHyO/tVWVd3qGw3d74xQTOKfRpqLqcc1udcz/0guo/vHFFIa5T7dTHiZhweBH4lbmOwK515cmg/se1SQ4avhJY6L45GbSewImgeG+4QxjUFQ+08IYTgDyqOVFZD3WNAl4JWv5moGMYbK8T1eXr9vLaZRDo0teCxvm6vaqpy++/rw+B8d5wPwJfbgb059sns9dRdyezT6WuxMo6CJx03tLAf/cJQIQ3/BjwaH39fZ3yCoXzi8Bu4hoCSf8f3rhHgdHe8H8DOd7/hDlA36BpbyRw0iwf+Fk41AWcA6zwxq8Abmrgugz4PfC1t/zrw2R7VVmX39vLe/8w8HgV0/q2vU5Ul9/bi8DJ2c+85S8FRgRN+x/edLnAZeFQF4HzA5X/TpcA/9bAdV1NIMzXAFPwQr4+/r50Z7aIiFSrKZ+jEBGROqCgEBGRaikoRESkWgoKERGploJCRESqpaAQEZFqKShERKRaCgoREanW/wdKS9ZYpctsawAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([-0.50113141, -0.4992302 , -0.49869624, -0.49850998, -0.49919354])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# examine the best model\n",
    "print(-grid_search.best_score_)\n",
    "print(grid_search.best_params_)\n",
    "# plot CV误差曲线\n",
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid_search.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid_search.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid_search.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "x_axis = colsample_bytree\n",
    "\n",
    "plt.plot(x_axis, -test_means)\n",
    "#plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i] ,label = str(max_depths[i]) +' Test')\n",
    "#plt.errorbar(x_axis, -train_scores[:,i], yerr=train_stds[:,i] ,label = str(max_depths[i]) +' Train')\n",
    "\n",
    "plt.show()\n",
    "\n",
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 'colsample_bytree': 0.8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best n_estimators: 1627\n",
      "best cv score: 0.4837460307740036\n"
     ]
    }
   ],
   "source": [
    "#较少学习率，调整基学习器\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.01,\n",
    "      # 'n_estimators':n_estimators_1,\n",
    "        'min_child_samples': 60,\n",
    "       'num_leaves':60,\n",
    "        'sub_samples': 0.5 ,\n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.5,\n",
    "\n",
    "       'colsample_bytree':0.8\n",
    "       }\n",
    "\n",
    "n_estimators_2 = get_n_estimators(params , X_train , y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.8,\n",
       "        importance_type='split', learning_rate=0.01, max_bin=127,\n",
       "        max_depth=-1, maxdepth=7, min_child_samples=60,\n",
       "        min_child_weight=0.001, min_split_gain=0.0, n_estimators=1627,\n",
       "        n_jobs=-1, num_leaves=60, objective='multiclass',\n",
       "        random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=False,\n",
       "        sub_samples=0.5, subsample=0.5, subsample_for_bin=200000,\n",
       "        subsample_freq=0)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#训练全体数据集\n",
    "params={'boosting_type':'goss',\n",
    "       'objective':'multiclass',\n",
    "       'n_jobs':-1,\n",
    "       'learning_rate':0.01,\n",
    "       'n_estimators':n_estimators_2,\n",
    "        'min_child_samples': 60,\n",
    "       'num_leaves':60,\n",
    "        'sub_samples': 0.5 ,\n",
    "        'maxdepth':7,\n",
    "       'max_bin':127,\n",
    "       'subsample':0.5,\n",
    "\n",
    "       'colsample_bytree':0.8\n",
    "       }\n",
    "\n",
    "lg = LGBMClassifier(silent=False,  **params)\n",
    "lg.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle\n",
    "\n",
    "pickle.dump(lg, open(\"Otto_LightGBM_goss_tfidf1.pkl\", 'wb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame({\"columns\":list(feat_names), \"importance\":list(lg.feature_importances_.T)})\n",
    "df = df.sort_values(by=['importance'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>importance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>feat_67_tfidf</td>\n",
       "      <td>32345</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>feat_25_tfidf</td>\n",
       "      <td>31634</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>feat_24_tfidf</td>\n",
       "      <td>30434</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>feat_48_tfidf</td>\n",
       "      <td>28768</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>feat_86_tfidf</td>\n",
       "      <td>25966</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>feat_40_tfidf</td>\n",
       "      <td>25516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>feat_14_tfidf</td>\n",
       "      <td>23172</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>feat_64_tfidf</td>\n",
       "      <td>19519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>feat_62_tfidf</td>\n",
       "      <td>19341</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>feat_34_tfidf</td>\n",
       "      <td>17788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>feat_88_tfidf</td>\n",
       "      <td>17740</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>feat_15_tfidf</td>\n",
       "      <td>17705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>feat_42_tfidf</td>\n",
       "      <td>16848</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>feat_16_tfidf</td>\n",
       "      <td>16598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>feat_33_tfidf</td>\n",
       "      <td>16466</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>feat_60_tfidf</td>\n",
       "      <td>15014</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>feat_32_tfidf</td>\n",
       "      <td>14910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>feat_54_tfidf</td>\n",
       "      <td>14202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>feat_70_tfidf</td>\n",
       "      <td>13867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>feat_8_tfidf</td>\n",
       "      <td>13633</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>feat_72_tfidf</td>\n",
       "      <td>13173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>feat_43_tfidf</td>\n",
       "      <td>12591</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>feat_36_tfidf</td>\n",
       "      <td>12008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>feat_9_tfidf</td>\n",
       "      <td>11831</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>feat_75_tfidf</td>\n",
       "      <td>11333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>feat_71_tfidf</td>\n",
       "      <td>11217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>feat_85_tfidf</td>\n",
       "      <td>11127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>feat_11_tfidf</td>\n",
       "      <td>11015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>feat_66_tfidf</td>\n",
       "      <td>10787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>feat_92_tfidf</td>\n",
       "      <td>10124</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>feat_65_tfidf</td>\n",
       "      <td>5163</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>feat_80_tfidf</td>\n",
       "      <td>5089</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>feat_4_tfidf</td>\n",
       "      <td>4963</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>feat_30_tfidf</td>\n",
       "      <td>4697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>feat_58_tfidf</td>\n",
       "      <td>4412</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>feat_91_tfidf</td>\n",
       "      <td>4400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>feat_3_tfidf</td>\n",
       "      <td>4260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>feat_49_tfidf</td>\n",
       "      <td>3885</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>feat_27_tfidf</td>\n",
       "      <td>3700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>feat_46_tfidf</td>\n",
       "      <td>3490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>feat_63_tfidf</td>\n",
       "      <td>3440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>feat_7_tfidf</td>\n",
       "      <td>3427</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>feat_23_tfidf</td>\n",
       "      <td>3419</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>feat_12_tfidf</td>\n",
       "      <td>3414</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>feat_52_tfidf</td>\n",
       "      <td>3231</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>feat_21_tfidf</td>\n",
       "      <td>3213</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>feat_45_tfidf</td>\n",
       "      <td>3054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>feat_77_tfidf</td>\n",
       "      <td>3007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>feat_19_tfidf</td>\n",
       "      <td>2943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>feat_93_tfidf</td>\n",
       "      <td>2807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>feat_5_tfidf</td>\n",
       "      <td>2770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>feat_28_tfidf</td>\n",
       "      <td>2731</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>feat_81_tfidf</td>\n",
       "      <td>2451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>feat_2_tfidf</td>\n",
       "      <td>2349</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>feat_31_tfidf</td>\n",
       "      <td>2032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>feat_61_tfidf</td>\n",
       "      <td>1225</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>feat_84_tfidf</td>\n",
       "      <td>1149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>feat_82_tfidf</td>\n",
       "      <td>1100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>feat_6_tfidf</td>\n",
       "      <td>949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>feat_51_tfidf</td>\n",
       "      <td>803</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>93 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          columns  importance\n",
       "66  feat_67_tfidf       32345\n",
       "24  feat_25_tfidf       31634\n",
       "23  feat_24_tfidf       30434\n",
       "47  feat_48_tfidf       28768\n",
       "85  feat_86_tfidf       25966\n",
       "39  feat_40_tfidf       25516\n",
       "13  feat_14_tfidf       23172\n",
       "63  feat_64_tfidf       19519\n",
       "61  feat_62_tfidf       19341\n",
       "33  feat_34_tfidf       17788\n",
       "87  feat_88_tfidf       17740\n",
       "14  feat_15_tfidf       17705\n",
       "41  feat_42_tfidf       16848\n",
       "15  feat_16_tfidf       16598\n",
       "32  feat_33_tfidf       16466\n",
       "59  feat_60_tfidf       15014\n",
       "31  feat_32_tfidf       14910\n",
       "53  feat_54_tfidf       14202\n",
       "69  feat_70_tfidf       13867\n",
       "7    feat_8_tfidf       13633\n",
       "71  feat_72_tfidf       13173\n",
       "42  feat_43_tfidf       12591\n",
       "35  feat_36_tfidf       12008\n",
       "8    feat_9_tfidf       11831\n",
       "74  feat_75_tfidf       11333\n",
       "70  feat_71_tfidf       11217\n",
       "84  feat_85_tfidf       11127\n",
       "10  feat_11_tfidf       11015\n",
       "65  feat_66_tfidf       10787\n",
       "91  feat_92_tfidf       10124\n",
       "..            ...         ...\n",
       "64  feat_65_tfidf        5163\n",
       "79  feat_80_tfidf        5089\n",
       "3    feat_4_tfidf        4963\n",
       "29  feat_30_tfidf        4697\n",
       "57  feat_58_tfidf        4412\n",
       "90  feat_91_tfidf        4400\n",
       "2    feat_3_tfidf        4260\n",
       "48  feat_49_tfidf        3885\n",
       "26  feat_27_tfidf        3700\n",
       "45  feat_46_tfidf        3490\n",
       "62  feat_63_tfidf        3440\n",
       "6    feat_7_tfidf        3427\n",
       "22  feat_23_tfidf        3419\n",
       "11  feat_12_tfidf        3414\n",
       "51  feat_52_tfidf        3231\n",
       "20  feat_21_tfidf        3213\n",
       "44  feat_45_tfidf        3054\n",
       "76  feat_77_tfidf        3007\n",
       "18  feat_19_tfidf        2943\n",
       "92  feat_93_tfidf        2807\n",
       "4    feat_5_tfidf        2770\n",
       "27  feat_28_tfidf        2731\n",
       "80  feat_81_tfidf        2451\n",
       "1    feat_2_tfidf        2349\n",
       "30  feat_31_tfidf        2032\n",
       "60  feat_61_tfidf        1225\n",
       "83  feat_84_tfidf        1149\n",
       "81  feat_82_tfidf        1100\n",
       "5    feat_6_tfidf         949\n",
       "50  feat_51_tfidf         803\n",
       "\n",
       "[93 rows x 2 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>feat_1_tfidf</th>\n",
       "      <th>feat_2_tfidf</th>\n",
       "      <th>feat_3_tfidf</th>\n",
       "      <th>feat_4_tfidf</th>\n",
       "      <th>feat_5_tfidf</th>\n",
       "      <th>feat_6_tfidf</th>\n",
       "      <th>feat_7_tfidf</th>\n",
       "      <th>feat_8_tfidf</th>\n",
       "      <th>feat_9_tfidf</th>\n",
       "      <th>...</th>\n",
       "      <th>feat_84_tfidf</th>\n",
       "      <th>feat_85_tfidf</th>\n",
       "      <th>feat_86_tfidf</th>\n",
       "      <th>feat_87_tfidf</th>\n",
       "      <th>feat_88_tfidf</th>\n",
       "      <th>feat_89_tfidf</th>\n",
       "      <th>feat_90_tfidf</th>\n",
       "      <th>feat_91_tfidf</th>\n",
       "      <th>feat_92_tfidf</th>\n",
       "      <th>feat_93_tfidf</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.421803</td>\n",
       "      <td>0.052224</td>\n",
       "      <td>0.842245</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0.068759</td>\n",
       "      <td>0.094897</td>\n",
       "      <td>0.502059</td>\n",
       "      <td>0.535424</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.143963</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.070171</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.071486</td>\n",
       "      <td>0.648348</td>\n",
       "      <td>0.050417</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.078248</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.071995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.048481</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.139311</td>\n",
       "      <td>0.034257</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0.048446</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.047156</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.065018</td>\n",
       "      <td>0.081172</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.556178</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 94 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  feat_1_tfidf  feat_2_tfidf  feat_3_tfidf  feat_4_tfidf  feat_5_tfidf  \\\n",
       "0   1      0.000000      0.000000      0.000000      0.000000           0.0   \n",
       "1   2      0.068759      0.094897      0.502059      0.535424           0.0   \n",
       "2   3      0.000000      0.071486      0.648348      0.050417           0.0   \n",
       "3   4      0.000000      0.000000      0.000000      0.048481           0.0   \n",
       "4   5      0.048446      0.000000      0.000000      0.047156           0.0   \n",
       "\n",
       "   feat_6_tfidf  feat_7_tfidf  feat_8_tfidf  feat_9_tfidf      ...        \\\n",
       "0           0.0      0.000000      0.000000           0.0      ...         \n",
       "1           0.0      0.000000      0.000000           0.0      ...         \n",
       "2           0.0      0.000000      0.000000           0.0      ...         \n",
       "3           0.0      0.000000      0.000000           0.0      ...         \n",
       "4           0.0      0.065018      0.081172           0.0      ...         \n",
       "\n",
       "   feat_84_tfidf  feat_85_tfidf  feat_86_tfidf  feat_87_tfidf  feat_88_tfidf  \\\n",
       "0            0.0       0.000000       0.421803       0.052224       0.842245   \n",
       "1            0.0       0.000000       0.000000       0.000000       0.000000   \n",
       "2            0.0       0.000000       0.000000       0.000000       0.078248   \n",
       "3            0.0       0.139311       0.034257       0.000000       0.000000   \n",
       "4            0.0       0.000000       0.000000       0.000000       0.000000   \n",
       "\n",
       "   feat_89_tfidf  feat_90_tfidf  feat_91_tfidf  feat_92_tfidf  feat_93_tfidf  \n",
       "0       0.000000            0.0       0.000000       0.000000       0.000000  \n",
       "1       0.143963            0.0       0.000000       0.070171       0.000000  \n",
       "2       0.000000            0.0       0.000000       0.000000       0.071995  \n",
       "3       0.000000            0.0       0.000000       0.000000       0.000000  \n",
       "4       0.000000            0.0       0.556178       0.000000       0.000000  \n",
       "\n",
       "[5 rows x 94 columns]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test=pd.read_csv(\"Otto_FE_test_tfidf.csv\")\n",
    "test.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(144368, 9)"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_id=test['id']\n",
    "X_test=test.drop([\"id\"],axis=1)\n",
    "#保留特征名字\n",
    "feat_names=X_test.columns\n",
    "#数据用稀疏矩阵表示，模型训练变快\n",
    "from scipy.sparse import csr_matrix\n",
    "X_test=csr_matrix(X_test)\n",
    "import pickle\n",
    "LightGBM_goss=pickle.load(open(\"Otto_LightGBM_goss_tfidf1.pkl\",'rb'))\n",
    "y_test_pred=LightGBM_goss.predict_proba(X_test)\n",
    "y_test_pred.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "#生成提交结果\n",
    "out_df=pd.DataFrame(y_test_pred)\n",
    "columns=np.empty(9,dtype=object)\n",
    "for i in range(9):\n",
    "    columns[i]='Class_'+str(i+1)\n",
    "out_df.columns=columns\n",
    "out_df=pd.concat([test_id,out_df],axis=1)\n",
    "out_df.to_csv(\"Otto_LightGBM_goss_tfidf1.csv\",index=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![image1]\n",
    "![image2]\n",
    "\n",
    "[image2]:\n",
    "\n",
    "\n",
    "[image1]:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "885名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
